Expression Value is Constant (EVC)

Description:

EVC detects expressions that always evaluate to the same value, whatever the operand values may be. EVC detects expressions where a constant value is constructed from compile-time constant expressions and does not produce a warning message in such cases.

Incorrect:

void putChar(char c, bool isLetter, bool isDigit) {
    if (isDigit) {
        bool isLetterOrDigit = isLetter || isDigit;
        ...
    }
}